package com.ruoyi.stock.service.impl;

import com.ruoyi.stock.domain.StockDaily;
import com.ruoyi.stock.mapper.StockDailyMapper;
import com.ruoyi.stock.service.IStockDailyService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 股票日线行情信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-10-23
 */
@Service
public class StockDailyServiceImpl implements IStockDailyService {
  @Autowired private StockDailyMapper stockDailyMapper;

  /**
   * 查询股票日线行情信息
   *
   * @param id 股票日线行情信息主键
   * @return 股票日线行情信息
   */
  @Override
  public StockDaily selectStockDailyById(Long id) {
    return stockDailyMapper.selectStockDailyById(id);
  }

  /**
   * 查询股票日线行情信息列表
   *
   * @param stockDaily 股票日线行情信息
   * @return 股票日线行情信息
   */
  @Override
  public List<StockDaily> selectStockDailyList(StockDaily stockDaily) {
    return stockDailyMapper.selectStockDailyList(stockDaily);
  }

  @Override
  public int count(StockDaily stockDaily) {
    return stockDailyMapper.count(stockDaily);
  }

  /**
   * 新增股票日线行情信息
   *
   * @param stockDaily 股票日线行情信息
   * @return 结果
   */
  @Override
  public int insertStockDaily(StockDaily stockDaily) {
    return stockDailyMapper.insertStockDaily(stockDaily);
  }

  @Override
  public int insertBatch(List<StockDaily> list) {
    return stockDailyMapper.insertBatch(list);
  }

  /**
   * 修改股票日线行情信息
   *
   * @param stockDaily 股票日线行情信息
   * @return 结果
   */
  @Override
  public int updateStockDaily(StockDaily stockDaily) {
    return stockDailyMapper.updateStockDaily(stockDaily);
  }

  /**
   * 批量删除股票日线行情信息
   *
   * @param ids 需要删除的股票日线行情信息主键
   * @return 结果
   */
  @Override
  public int deleteStockDailyByIds(List<Long> ids) {
    return stockDailyMapper.deleteStockDailyByIds(ids);
  }

  /**
   * 删除股票日线行情信息信息
   *
   * @param id 股票日线行情信息主键
   * @return 结果
   */
  @Override
  public int deleteStockDailyById(Long id) {
    return stockDailyMapper.deleteStockDailyById(id);
  }
}
